#import "..\\ATL\\Obj\\ATL.tlb" no_namespace, named_guids

int main()
{
    HRESULT hResult;

    //CoInitialize(nullptr);
    CoInitializeEx(nullptr, COINIT_MULTITHREADED);

    IATLSimpleObject* lpIATLSimpleObject = nullptr;

    do
    {
        hResult = CoCreateInstance(CLSID_ATLSimpleObject, nullptr, CLSCTX_INPROC_SERVER,
            IID_IATLSimpleObject, (void**)&lpIATLSimpleObject);
        if (hResult != S_OK) break;

        lpIATLSimpleObject->Test();

    } while (FALSE);


    if (lpIATLSimpleObject)
        lpIATLSimpleObject->Release();

    CoUninitialize();

    return 0;
}